
// teste do yam com a instrução AND

package main

import (
  "ygo"
  "fmt"
)


func main() {

	load := make(chan int32)
	instruction_address := make(chan uint32)
	instruction := make(chan uint32)
	end := make(chan uint32)
	ls_addr := make(chan uint32)
	ls_rw := make(chan bool)
	ls_data_in := make(chan int32)
	ls_data_out := make(chan int32)



	go ygo.Memory(load, instruction_address, instruction, ls_addr, ls_rw, ls_data_in, ls_data_out)
	go ygo.Yam(instruction_address,instruction, ls_addr, ls_rw, ls_data_in, ls_data_out)

	fmt.Println("[TB ] Sending data to memory")

	for i:=0; i<10; i++{
		load <- 98340
	}

	fmt.Println("[TB ] Closing memory")
	close(load)

	fmt.Println("[TB ] Infinite loop")
	for {
		<- end
	} 

}
